Skip to content

fix(server): return 400 on malformed assetIds query parameter (#502)#537

Closed
SAY-5 wants to merge 1 commit into
eclipse-basyx:mainfrom
SAY-5:say5-fix-asset-id-key-error
Closed

fix(server): return 400 on malformed assetIds query parameter (#502)#537
SAY-5 wants to merge 1 commit into
eclipse-basyx:mainfrom
SAY-5:say5-fix-asset-id-key-error

Conversation

@SAY-5

@SAY-5 SAY-5 commented May 12, 2026

Copy link
Copy Markdown

Fixes #502.

The _get_shells handler base64url-decoded each assetIds query parameter, JSON-parsed it, then directly indexed asset_dict["name"] and asset_dict["value"]. A client-supplied payload missing either key (or a non-object JSON value, or invalid JSON) propagated as an unhandled exception, producing a 500 Internal Server Error.

Wrap the JSON parse and the field lookups so client-side validation failures return BadRequest (400) with a clear message, matching the rest of the handler's error model.

@zrgt

zrgt commented May 12, 2026

Copy link
Copy Markdown
Contributor

Already fixed in #511

@zrgt zrgt closed this May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Asset ID decoding: missing KeyError handling causes 500 on malformed assetIds query parameter

2 participants